package vip.george.common.constant;

/**
 * 返回给前端的数据响应码
 */
public enum ResultCodeEnum {
    SUCCESS("200", "操作成功"),
    FAILED("500", "操作失败"),
    FEIGN_ERROR("501", "服务调用异常"),
    VALIDATE_FAILED("404", "参数检验失败"),
    UNAUTHORIZED("401", "暂未登录或token已经过期"),
    FORBIDDEN("403", "没有相关权限"),
    SYSTEM_FAIL("10000", "未知业务错误"),
    SYSTEM_BUSY("10001", "系统繁忙，请稍后再试"),
    API_REQUEST_LIMIT("10002", "操作频繁，请稍后再试"),
    USER_NOT_EXIST("10003", "用户不存在")


    ;
    private String code;
    private String message;

    private ResultCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
